package com.summer.config.custom.configuration;

import org.hibernate.validator.constraints.Length;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Min;

@ConfigurationProperties(prefix = "summer.config")
@Component
@Validated
public class ConfigurationConfig {

    @Length(min = 10)
    private String title;

    private String randomStr;
    private int randomInt;
    private  Long randomLong;
    private int random10;
    private int random20;
    private String password;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getRandomStr() {
        return randomStr;
    }

    public void setRandomStr(String randomStr) {
        this.randomStr = randomStr;
    }

    public int getRandomInt() {
        return randomInt;
    }

    public void setRandomInt(int randomInt) {
        this.randomInt = randomInt;
    }

    public Long getRandomLong() {
        return randomLong;
    }

    public void setRandomLong(Long randomLong) {
        this.randomLong = randomLong;
    }

    public int getRandom10() {
        return random10;
    }

    public void setRandom10(int random10) {
        this.random10 = random10;
    }

    public int getRandom20() {
        return random20;
    }

    public void setRandom20(int random20) {
        this.random20 = random20;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
